<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="referrer" content="origin">
    <title>车辆初检列表</title>
    <link rel="stylesheet" type="text/css" href="../css/login.css">
    <link rel="stylesheet" type="text/css" href="../js/layer/theme/default/layer.css">
    <script src="https://cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="../js/vue.js"></script>
    <script type="text/javascript" src="../js/config.js"></script>
    <script type="text/javascript" src="../js/filter.js"></script>
    <script type="text/javascript" src="../js/paging.js"></script>
    <script type="text/javascript" src="../js/layer/layer.js"></script>
  </head>
  <body style="background:#fff;">
  	<form id="searchForm">
      <div class="search-bar clearfix panel" style="height: auto;padding-bottom: 0px;">
        <div class="box">
          <div class="cell-search">
          <input type="hidden" name="marketId">
          <label>初检结果</label>
          <select name="carDetectState">
              <option value="">请选择</option>
              <option value="500">未初检</option>
              <option value="510">初检未通过</option>
              <option value="520">初检通过</option>
            </select>
          <label>车商</label>
          <select name="shopId">
            <option value="">请选择</option>
            <option v-for="shopItem in shopList" :value="shopItem.shopId">{{shopItem.shopName}}</option>
          </select>
        </div> 
          <div class="search-btn-box">
            <button type="button" id="serchFirstDetectBtn">查询</button>
          </div>
        </div>
      </div>
    </form>
    <div class="" id="app">
      <table class="list-box cars-table">
        <thead>
          <tr>
            <th>首图</th>
            <th>车辆信息</th>
            <th>车辆联系人信息</th>
            <th>检测状态</th>
            <th >操作</th>  
          </tr>
        </thead>
        
        <tbody>
          <tr v-for="re in res">
            <td class="cars-img">
              <img  v-if="re.carImageUrl" v-bind:src="imgUrl + re.carImageUrl+'.w_200xh_200'">
              <img src="../images/default.png" v-else="re.carImageUrl">
            </td>
            <td>
              <p>品牌车系:{{re.carTitle}}</p>
              <p>车架号:{{re.carVin}}</p>
              <p>上牌日期:{{re.carLicenceDate | filterGetDate}}</p>
              <p>车牌号:{{re.carPlate }}</p>
            </td>
            <td>
              <p>公司名称:{{re.shop.shopName}}</p>
              <p>车商联系人:{{re.shop.shopManageName}}</p>
              <p>联系方式:{{re.shop.shopManageMobile}}</p>
            </td>
            <td style="text-align: center;">
              <p>{{re.carDetectState >= 520 ? 520 : re.carDetectState | filterCarDetectState }}</p>
            </td>
            <td class="cars-control">
              <a class="over-small"  v-if="re.carDetectState != 500"  v-bind:id="re.carId" :data-detectState="re.carDetectState" onclick="showCarLogDetect(id)" >操作日志</a>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <div id="page" class="page_div"></div>
    <div class="loading"></div>
    <div id="carLogBox" style="display:none">
      <table class="car-log">
        <tr>
          <th>初检时间</th>
          <td>{{log.carLogCreateTime | filterGetTime}}</td>
        </tr>
        <tr>
          <th>操作</th>
          <td>{{log.carLogInfo}}</td>
        </tr>
        <tr>
          <th>初检人</th>
          <td>{{log.user.userName}}</td>
        </tr>
      </table>
    </div>
    
  </body>
  <script type="text/javascript">
  $('input[name=marketId]').val(marketId);
  </script>
  <script type="text/javascript" src="../js/search_car_first_detect.js"></script>
</html>